from model import traces_preprocess as pre
from model import traces_rca as rca
from model import traces_visualization as viz

# 采样
unsatisfied_traces_ids = pre.prepare_unsatisfied_traces_ids()
normal_traces_ids = pre.prepare_normal_traces_ids(10000)

# 预处理
pre.fetch_and_build_trace("unsatisfied", unsatisfied_traces_ids, step=250)
pre.fetch_and_build_trace("normal", normal_traces_ids, step=250)

# 统计
pre.stats_normal_traces()

# 根因分析
rca.rca()

# 可视化
viz.visualize('abca8788b8eafaba13911a1e9fa45377')